<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>模板字符串</title>
</head>
<body>
<script>
    var name = "王加贝";
    var address = "信阳";
    var hobby = "打钱，懂？";
    var info = "我"+name+"来自"+address+"喜欢"+hobby;
    console.log(info);
    //使用模板字串拼接
    var info1 = `我是${name},来自${address},喜欢${hobby}`;
    console.log(info1);
</script>
</body>
</html>